﻿using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using Verse;

namespace SZ.Mech
{
    public class Building_CrateAwake : Building_Crate
    {
        public string wakeUpSignalTag = "CompCanBeDormant.WakeUp";
        public override void Open()
        {
            base.Open();
            Activate();
        }
        public override void PostApplyDamage(DamageInfo dinfo, float totalDamageDealt)
        {
            base.PostApplyDamage(dinfo, totalDamageDealt);
            Activate();
        }
        public void Activate(bool sendSignal = true, bool silent = false)
        {
            Find.SignalManager.SendSignal(new Signal(wakeUpSignalTag, this.Named("SUBJECT")));
        }
        public void TickRareWorker()
        {

        }
    }

}